function sayHi(){
    console.log('hello', this.name);
}
var person2 = {
    name:'Christina',
    sayHi: sayHi
}

var person1 = {
    name: 'YetteLau',
    friend: person2
}
// 当函数作为对象的方法时，this指向对象， 当前对象是person2
var obj = person1.friend;
obj.sayHi();
person1.friend.sayHi();